/**
 * 打开新窗口
 * @param {*} url
 * @param {*} opt
 */
export function openWindow(url: string, opt: any = {}) {
  const { target = '_self', noopener = true, noreferrer = true } = opt || {}
  const feature: string[] = []
  noopener && feature.push('noopener=yes')
  noreferrer && feature.push('noreferrer=yes')
  window.open(url, target, feature.join(','))
}
